import { http } from '@/utils/http';
import type { Class } from './index.d';

export { Class };

/**  获取班级花名册 */
export const getClassRoster = (data: Class.RosterParams) => {
	return http<Class.RosterData>({
		url: `/api/student/get_class_user`,
		method: 'POST',
		data,
	});
};

/**  获取班级动态 */
export const getClassDynamic = (query: Class.DynamicParams) => {
	return http<Class.DynamicData>({
		url: `/api/plan/class_message`,
		method: 'GET',
		query,
	});
};

/**  获取班级主页信息 */
export const getClassInfo = () => {
	return http<Class.HomeInfo>({
		url: `/api/plan/class_plan`,
		method: 'GET',
	});
};
